#include <set>
#include <map>
#include <iostream>
#include <functional>

template <typename T>
class Greater {
public:
	bool operator()(T a, T b) {return  a > b;}
};

bool greater(int a, int b) {
	return a > b;
}

void test_ordered(){
	std::set<int> s;
	for (int i = 0; i< 10; i++)
		s.insert(i);
	for (std::set<int>::iterator iter = s.begin(); iter != s.end(); ++iter) {
		std::cout << *iter << ' ';
	}  
	std::cout << std::endl;

	std::set<int, Greater<int> > sg;
	for (int i = 0; i< 10; i++)
		sg.insert(i);
	for (auto iter = sg.begin(); iter != sg.end(); ++iter)
		std::cout << *iter << ' ';
	std::cout << std::endl;

}